home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / gui / mui23dev.lha / MUI / Developer / Autodocs / MUI_Application.doc next >
Text File  |  1994-12-23  |  36KB  |  1,178 lines

  1. TABLE OF CONTENTS
  2.  
  3. Application.mui/Application.mui
  4. Application.mui/MUIM_Application_GetMenuCheck
  5. Application.mui/MUIM_Application_GetMenuState
  6. Application.mui/MUIM_Application_Input
  7. Application.mui/MUIM_Application_InputBuffered
  8. Application.mui/MUIM_Application_Load
  9. Application.mui/MUIM_Application_PushMethod
  10. Application.mui/MUIM_Application_ReturnID
  11. Application.mui/MUIM_Application_Save
  12. Application.mui/MUIM_Application_SetMenuCheck
  13. Application.mui/MUIM_Application_SetMenuState
  14. Application.mui/MUIM_Application_ShowHelp
  15. Application.mui/MUIA_Application_Active
  16. Application.mui/MUIA_Application_Author
  17. Application.mui/MUIA_Application_Base
  18. Application.mui/MUIA_Application_Broker
  19. Application.mui/MUIA_Application_BrokerHook
  20. Application.mui/MUIA_Application_BrokerPort
  21. Application.mui/MUIA_Application_BrokerPri
  22. Application.mui/MUIA_Application_Commands
  23. Application.mui/MUIA_Application_Copyright
  24. Application.mui/MUIA_Application_Description
  25. Application.mui/MUIA_Application_DiskObject
  26. Application.mui/MUIA_Application_DoubleStart
  27. Application.mui/MUIA_Application_DropObject
  28. Application.mui/MUIA_Application_ForceQuit
  29. Application.mui/MUIA_Application_HelpFile
  30. Application.mui/MUIA_Application_Iconified
  31. Application.mui/MUIA_Application_Menu
  32. Application.mui/MUIA_Application_MenuAction
  33. Application.mui/MUIA_Application_MenuHelp
  34. Application.mui/MUIA_Application_Menustrip
  35. Application.mui/MUIA_Application_RexxHook
  36. Application.mui/MUIA_Application_RexxMsg
  37. Application.mui/MUIA_Application_RexxString
  38. Application.mui/MUIA_Application_SingleTask
  39. Application.mui/MUIA_Application_Sleep
  40. Application.mui/MUIA_Application_Title
  41. Application.mui/MUIA_Application_UseCommodities
  42. Application.mui/MUIA_Application_UseRexx
  43. Application.mui/MUIA_Application_Version
  44. Application.mui/MUIA_Application_Window
  45. Application.mui/Application.mui
  46.  
  47. Application class is the master class for all
  48. MUI applications. It serves as a kind of anchor
  49. for all input, either coming from the user or
  50. somewhere from the system, e.g. commodities
  51. or ARexx messages.
  52.  
  53. An application can have any number of sub windows,
  54. these windows are the children of the application.
  55. Application.mui/MUIM_Application_GetMenuCheck
  56.  
  57.     NAME
  58.     MUIM_Application_GetMenuCheck (V4 ) (OBSOLETE)
  59.  
  60.     SYNOPSIS
  61.     DoMethod(obj,MUIM_Application_GetMenuCheck,ULONG MenuID);
  62.  
  63.     FUNCTION
  64.     Ask whether a checkmark menu item has its checkmark
  65.     set or cleared.
  66.     The application will ask its sub windows for a
  67.     menu item with the given id and return the state of
  68.     the first item it finds.
  69.  
  70.     INPUTS
  71.     MenuID - the value you wrote into the
  72.                  UserData field of struct NewMenu.
  73.  
  74.     SEE ALSO
  75.     MUIM_Application_SetMenuCheck, MUIA_Application_Menu
  76. Application.mui/MUIM_Application_GetMenuState
  77.  
  78.     NAME
  79.     MUIM_Application_GetMenuState (V4 ) (OBSOLETE)
  80.  
  81.     SYNOPSIS
  82.     DoMethod(obj,MUIM_Application_GetMenuState,ULONG MenuID);
  83.  
  84.     FUNCTION
  85.     Ask whether a menu item is enabled or disabled.
  86.     The application will ask its sub windows for a
  87.     menu item with the given id and return the state of
  88.     the first item it finds.
  89.  
  90.     INPUTS
  91.     MenuID - the value you wrote into the
  92.                  UserData field of struct NewMenu.
  93.  
  94.     SEE ALSO
  95.     MUIM_Application_SetMenuState, MUIA_Application_Menu
  96. Application.mui/MUIM_Application_Input
  97.  
  98.     NAME
  99.     MUIM_Application_Input (V4 )
  100.  
  101.     SYNOPSIS
  102.     DoMethod(obj,MUIM_Application_Input,LONGBITS *signal);
  103.  
  104.     FUNCTION
  105.     The MUI system itself does not wait for any user input.
  106.     It just tells your application which signal bits it
  107.     has allocated, then it's up to you to call MUIs input
  108.     handle function when one of these signals gets set.
  109.  
  110.     In a simple MUI application you would just Wait()
  111.     for these signals and call MUI when one is received.
  112.     However, you can perfectly allocate some signal bits
  113.     yourself and include them in your Wait() command.
  114.     You needn't even Wait(), your application could
  115.     maybe calculate some fractal graphics or copy
  116.     disks, the only important thing is that you call
  117.     MUI's input method when one of the MUI allocated
  118.     signals arrives.
  119.  
  120.     The usual way of communication with your user
  121.     interface is via return ids. Every action happening
  122.     to the GUI can create return ids, e.g. pressing a
  123.     button or trying to close a window. MUI buffers these
  124.     ids and uses them as result codes for the input method.
  125.     Thats where you can get it from and take the appropriate
  126.     actions.
  127.  
  128.     Now lets have a look on a usual input loop of a
  129.     MUI application. Imagine you have an Play and a
  130.     Cancel button and have previously told them
  131.     to return ID_PLAY and ID_CANCEL when pressed.
  132.     (see MUIM_Notify and MUIM_Application_ReturnID
  133.     on information about these topics). Your input
  134.     loop would look like this:
  135.  
  136.  
  137.     while (running)
  138.     {
  139.        ULONG signals;
  140.  
  141.        switch (DoMethod(app,MUIM_Application_Input,&signals))
  142.        {
  143.           case ID_PLAY:
  144.              PlaySound();
  145.              break;
  146.  
  147.           case ID_CANCEL:
  148.           case MUIV_Application_ReturnID_Quit:
  149.              running = FALSE;
  150.              break;
  151.        }
  152.  
  153.        if (running && signals) Wait(signals);
  154.     }
  155.  
  156.  
  157.     So what is happening here?
  158.  
  159.     First, you have to call the MUIM_Application_Input method.
  160.     You supply the address of a ULONG as parameter, thats
  161.     where MUI fills in the signals it needs. Note that you can
  162.     call the input method at any time, regardless of signal
  163.     setting. MUI will simply return when there is nothing
  164.     to do.
  165.  
  166.     In case the user pressed the Play or the Cancel button,
  167.     MUIM_Application_Input will return ID_PLAY or ID_CANCEL.
  168.     Otherwise you will receive a 0, that's why you cannot
  169.     use 0 as one of your id values.
  170.  
  171.     There is one predefined id called
  172.     MUIV_Application_ReturnID_Quit. This will be sent to you
  173.     when someone tried to quit your application from outside,
  174.     e.g. via commodities exchange or the ARexx "quit" command.
  175.     It is required that your application handles this id,
  176.     just treat as if the user clicked on a "Quit" button or
  177.     selected a "Quit" menu item.
  178.  
  179.     After handling the return value, you have to examine
  180.     if MUI wants you to wait for any signals. If this
  181.     is the case (signals != 0), just wait for it. If
  182.     MUI puts a 0 into signals it wants to tell you to
  183.     immediately call the input method again, maybe some
  184.     other return ids have received and need to be handled.
  185.     You *must* check this because Wait()ing on a zero
  186.     signal mask is not a good idea!
  187.  
  188.     Note: It is very important that you call the input method
  189.     whenever a signal arrives. MUI needs this to correctly
  190.     refresh its windows, handle resizing and iconification
  191.     operations and commodities and ARexx messages. If you
  192.     don't, you will annoy your user!
  193.  
  194.     If your program needs to be in a state where you are
  195.     for some reasons unable to call the input method for
  196.     a considerable amount of time (maybe half a second or
  197.     more), you should put your application to sleep. See
  198.     MUIA_Application_Sleep on how to do this.
  199.  
  200.     SEE ALSO
  201.     MUIA_Application_Sleep, MUIM_Application_InputBuffered
  202. Application.mui/MUIM_Application_InputBuffered
  203.  
  204.     NAME
  205.     MUIM_Application_InputBuffered (V4 )
  206.  
  207.     SYNOPSIS
  208.     DoMethod(obj,MUIM_Application_InputBuffered,);
  209.  
  210.     FUNCTION
  211.     Imagine your application does some time consuming
  212.     operation, e.g. copying a disk, and you are for
  213.     some reasons unable to react on return ids during
  214.     this period. One solution would be to simply
  215.     put your application to sleep, it will get a
  216.     busy pointer and the user knows whats going on.
  217.  
  218.     However, this will make it impossible for the user
  219.     to resize your applications windows or iconify it,
  220.     he will have to wait until you are done with your
  221.     operation.
  222.  
  223.     MUIM_Application_InputBuffered offers a solution
  224.     for this problem. Using this method, you needn't
  225.     set to sleep your application. Just call it on a
  226.     regular basis and MUI will be able to handle
  227.     all actions concerning the GUI. You do not need
  228.     to pay attention on return values, they remain
  229.     on an internal stack until your next call to
  230.     the non buffered input method.
  231.  
  232.     EXAMPLE
  233.     for (track=0; track<80; track++)
  234.     {
  235.        read_track();
  236.        DoMethod(app,MUIM_Application_InputBuffered);
  237.        write_track();
  238.        DoMethod(app,MUIM_Application_InputBuffered);
  239.     }
  240.  
  241.     SEE ALSO
  242.     MUIM_Application_Input, MUIA_Application_Sleep
  243. Application.mui/MUIM_Application_Load
  244.  
  245.     NAME
  246.     MUIM_Application_Load (V4 )
  247.  
  248.     SYNOPSIS
  249.     DoMethod(obj,MUIM_Application_Load,STRPTR name);
  250.  
  251.     FUNCTION
  252.     MUIM_Application_Save, MUIM_Application_Load and
  253.     MUIA_ExportID offer an easy way of saving and loading
  254.     a programs configuration.
  255.  
  256.     Each gadget with a non NULL MUIA_ExportID will get
  257.     its contents saved during MUIM_Application_Save and
  258.     restored during MUIM_Application_Load. This makes
  259.     it very easy to design a configuration window
  260.     with "Save", "Use" and "Cancel" buttons to allow
  261.     the user storing the settings. When the application
  262.     starts, you would just have to call MUIM_Application_Load
  263.     and the stored settings will be read and installed.
  264.  
  265.     Not all classes are able to import and export their
  266.     contents. Currently, you may define MUIA_ExportIDs for
  267.  
  268.     String class   - MUIA_String_Contents is ex/imported.
  269.     Radio class    - MUIA_Radio_Active is ex/imported.
  270.     Cycle class    - MUIA_Cycle_Active is ex/imported.
  271.     List class     - MUIA_List_Active is /ex/imported.
  272.     Text class     - MUIA_Text_Contents is ex/imported.
  273.     Slider class   - MUIA_Slider_Level is ex/imported.
  274.     Area class     - MUIA_Selected is ex/imported
  275.                      (e.g. for Checkmark gadgets)
  276.    Menuitem class - MUIA_Checked is ex/imported (V9).
  277.     Group class    - MUIA_Group_ActivePage is ex/imported (V8).
  278.  
  279.     INPUTS
  280.     name - Name of the file you wish to load the settings from.
  281.            Usually you won't need to think of a real name but
  282.            instead use one of the magic cookies
  283.            MUIV_Application_Load_ENV or
  284.            MUIV_Application_Load_ENVARC.
  285.  
  286.     EXAMPLE
  287.     see the sample program "Settings.c"
  288.  
  289.     SEE ALSO
  290.     MUIM_Application_Save, MUIA_ExportID
  291. Application.mui/MUIM_Application_PushMethod
  292.  
  293.     NAME
  294.     MUIM_Application_PushMethod (V4 )
  295.  
  296.     SYNOPSIS
  297.     DoMethod(obj,MUIM_Application_PushMethod,Object *dest, LONG count, /* ... */);
  298.  
  299.     FUNCTION
  300.     Usually, you may not talk to the MUI system from two
  301.     tasks at the same time. MUIM_Application_PushMethod
  302.     provides some kind of solution for this problem.
  303.  
  304.     This (and only this) method may be called from a
  305.     second task. It takes another method as parameter
  306.     and puts in onto a private stack of the application
  307.     object. The next time MUIM_Application_Input
  308.     is called, the pushed method will be executed
  309.     in the context of the current task.
  310.  
  311.     INPUTS
  312.     dest  - object on which to perform the pushed method.
  313.         count - number of following arguments.
  314.     ...   - the destination method.
  315.  
  316.     EXAMPLE
  317.     /* set a status line from a sub task */
  318.     DoMethod(app,MUIM_Application_PushMethod,
  319.        txstatus,3,MUIM_Set,MUIA_Text_Contents,"reading...");
  320.  
  321.     SEE ALSO
  322.     MUIM_Application_Input
  323. Application.mui/MUIM_Application_ReturnID
  324.  
  325.     NAME
  326.     MUIM_Application_ReturnID (V4 )
  327.  
  328.     SYNOPSIS
  329.     DoMethod(obj,MUIM_Application_ReturnID,ULONG retid);
  330.  
  331.     FUNCTION
  332.     Tell MUI to return the given id with the next call to 
  333.     MUIM_Application_Input.
  334.  
  335.     Together with the MUI's notification mechanism, this
  336.     method connects your user interface and your program.
  337.     If you e.g. want to be informed if the user presses
  338.     a "Play" button, you would have define an id for
  339.     this action and set up a notification event with
  340.     MUIM_Notify.
  341.  
  342.     You can use any long word as return id, except
  343.     from -255 up to 0. These values are reserved for
  344.     MUI's internal use and for special return values
  345.     like MUIV_Application_ReturnID_Quit.
  346.  
  347.     Note that MUI will put all incoming return ids
  348.     onto a private fifo stack and feed this stack
  349.     to its input methods result code later.
  350.  
  351.     EXAMPLE
  352.  
  353.     /* inform me if a button is pressed (actually released, */
  354.     /* since this is the way amiga buttons are handled)     */
  355.  
  356.     #define ID_PLAYBUTTON 42
  357.  
  358.     ...
  359.  
  360.     DoMethod(buttonobj, MUIM_Notify,
  361.        MUIA_Pressed, FALSE,
  362.        appobj, 2, MUIM_Application_ReturndID, ID_PLAYBUTTON);
  363.  
  364.     ...
  365.  
  366.     while (running)
  367.     {
  368.        switch (DoMethod(appobj,MUIM_Application_Input,&sigs))
  369.        {
  370.           case ID_PLAYBUTTON:
  371.              printf("Ok, lets play a game...");
  372.              break;
  373.        }
  374.     }
  375.  
  376.     SEE ALSO
  377.     MUIM_Application_Input, MUIM_Notify
  378. Application.mui/MUIM_Application_Save
  379.  
  380.     NAME
  381.     MUIM_Application_Save (V4 )
  382.  
  383.     SYNOPSIS
  384.     DoMethod(obj,MUIM_Application_Save,STRPTR name);
  385.  
  386.     FUNCTION
  387.     MUIM_Application_Save, MUIM_Application_Load and
  388.     MUIA_ExportID offer an easy way of saving and loading
  389.     a programs configuration.
  390.  
  391.     Each gadget with a non NULL MUIA_ExportID will get
  392.     its contents saved during MUIM_Application_Save and
  393.     restored during MUIM_Application_Load. This makes
  394.     it very easy to design a configuration window
  395.     with "Save", "Use" and "Cancel" buttons to allow
  396.     the user storing the settings. When the application
  397.     starts, you would just have to call MUIM_Application_Load
  398.     and the stored settings will be read and installed.
  399.  
  400.     Not all classes are able to import and export their
  401.     contents. Currently, you may define MUIA_ExportIDs for
  402.  
  403.     String class   - MUIA_String_Contents is ex/imported.
  404.     Radio class    - MUIA_Radio_Active is ex/imported.
  405.     Cycle class    - MUIA_Cycle_Active is ex/imported.
  406.     List class     - MUIA_List_Active is /ex/imported.
  407.     Text class     - MUIA_Text_Contents is ex/imported.
  408.     Slider class   - MUIA_Slider_Level is ex/imported.
  409.     Area class     - MUIA_Selected is ex/imported
  410.                      (e.g. for Checkmark gadgets)
  411.    Menuitem class - MUIA_Checked is ex/imported (V9).
  412.     Group class    - MUIA_Group_ActivePage is ex/imported (V8).
  413.  
  414.     INPUTS
  415.     name - Name of the file you wish to save the settings to.
  416.            Usually you won't need to think of a real name but
  417.            instead use one of the magic cookies
  418.            MUIV_Application_Save_ENV or
  419.            MUIV_Application_Save_ENVARC.
  420.            This will save your application's settings somewhere
  421.            in env:mui/ or envarc:mui/, you needn't worry about
  422.            it.
  423.  
  424.     EXAMPLE
  425.     see the sample program "Settings.c"
  426.  
  427.     SEE ALSO
  428.     MUIM_Application_Load, MUIA_ExportID
  429. Application.mui/MUIM_Application_SetMenuCheck
  430.  
  431.     NAME
  432.     MUIM_Application_SetMenuCheck (V4 ) (OBSOLETE)
  433.  
  434.     SYNOPSIS
  435.     DoMethod(obj,MUIM_Application_SetMenuCheck,ULONG MenuID, LONG stat);
  436.  
  437.     FUNCTION
  438.     Set or clear the checkmark of a menu item.
  439.     The application will ask its sub windows for menu items
  440.     with the given id and set/clear all found
  441.     entries.
  442.  
  443.     INPUTS
  444.     MenuID - the value you wrote into the
  445.                  UserData field of struct NewMenu.
  446.  
  447.     set    - TRUE to set checkmark, FALSE to clear
  448.  
  449.     SEE ALSO
  450.     MUIM_Application_GetMenuCheck, MUIA_Application_Menu,
  451. Application.mui/MUIM_Application_SetMenuState
  452.  
  453.     NAME
  454.     MUIM_Application_SetMenuState (V4 ) (OBSOLETE)
  455.  
  456.     SYNOPSIS
  457.     DoMethod(obj,MUIM_Application_SetMenuState,ULONG MenuID, LONG stat);
  458.  
  459.     FUNCTION
  460.     Enable or disable a menu item.
  461.     The application will ask its sub windows for menu items
  462.     with the given id and enable/disable all found
  463.     entries.
  464.  
  465.     INPUTS
  466.     MenuID - the value you wrote into the
  467.                  UserData field of struct NewMenu.
  468.  
  469.     set    - TRUE to enable item, FALSE to disable.
  470.  
  471.     SEE ALSO
  472.     MUIM_Application_GetMenuState, MUIA_Application_Menu,
  473. Application.mui/MUIM_Application_ShowHelp
  474.  
  475.     NAME
  476.     MUIM_Application_ShowHelp (V4 )
  477.  
  478.     SYNOPSIS
  479.     DoMethod(obj,MUIM_Application_ShowHelp,Object *window, char *name, char *node, LONG line);
  480.  
  481.     FUNCTION
  482.     Show an AmigaGuide help file. The application will be
  483.     put to sleep until the file is displayed.
  484.  
  485.     Usually, you don't need to call this method directly.
  486.     MUI comes with a sophisticated online help system,
  487.     you just need to supply your gadgets with help nodes
  488.     and everything will be handled automatically.
  489.  
  490.     INPUTS
  491.     window - (Object *) - Help will appear on this windows
  492.                           screen. May be NULL.
  493.     name   - (char *)   - name of the help file
  494.     node   - (char *)   - name of a node in this help file
  495.     line   - (char *)   - line number
  496.  
  497.     SEE ALSO
  498.     MUIA_HelpFile, MUIA_HelpNode, MUIA_HelpLine
  499. Application.mui/MUIA_Application_Active
  500.  
  501.     NAME
  502.     MUIA_Application_Active -- (V4 ) [ISG], BOOL
  503.  
  504.     FUNCTION
  505.     This attribute reflects the state that the user adjusted
  506.     with commodities Exchange. MUI itself doesn't pay any
  507.     attention to it, this is up to you.
  508.  
  509.     SEE ALSO
  510.     MUIA_Application_Broker
  511. Application.mui/MUIA_Application_Author
  512.  
  513.     NAME
  514.     MUIA_Application_Author -- (V4 ) [I.G], STRPTR
  515.  
  516.     FUNCTION
  517.     Name of the applications author.
  518.  
  519.     EXAMPLE
  520.     see MUIA_Application_Title
  521.  
  522.     SEE ALSO
  523.     MUIA_Application_Title, MUIA_Application_Copyright,
  524.     MUIA_Application_Version, MUIA_Application_Description,
  525.     MUIA_Application_Base
  526. Application.mui/MUIA_Application_Base
  527.  
  528.     NAME
  529.     MUIA_Application_Base -- (V4 ) [I.G], STRPTR
  530.  
  531.     FUNCTION
  532.     The basename for an application. This name is used
  533.     for the builtin ARexx port and for some internal
  534.     file management.
  535.  
  536.     A basename must neither contain spaces nor any
  537.     special characters such as ":/()#?*...".
  538.  
  539.     When your program is a single task application
  540.     (i.e. MUIA_Application_SingleTask is TRUE), the
  541.     base name will be used without further modification.
  542.  
  543.     Otherwise, it gets a ".1", ".2", etc. appended,
  544.     depending on how many applications are already
  545.     running. If you need to know the name of your
  546.     ARexx port, you can query the base name attribute
  547.     after the application is created.
  548.  
  549.     EXAMPLE
  550.     see MUIA_Application_Title
  551.  
  552.     SEE ALSO
  553.     MUIA_Application_Title, MUIA_Application_Version,
  554.     MUIA_Application_Author, MUIA_Application_Copyright,
  555.     MUIA_Application_Description
  556. Application.mui/MUIA_Application_Broker
  557.  
  558.     NAME
  559.     MUIA_Application_Broker -- (V4 ) [..G], Broker *
  560.  
  561.     FUNCTION
  562.     If you need to attach some additional commodities objects
  563.     to your application (e.g. because you need lots of hotkeys),
  564.     you can obtain a pointer to the applications Broker structure
  565.     and add some commodities objects.
  566.  
  567.     MUI will free the complete broker when the application is
  568.     disposed, no need for you to free your objects yourself.
  569.  
  570.     To receive input from your objects, you will also need to
  571.     install a MUIA_Application_BrokerHook.
  572.  
  573.     NOTES
  574.     Unless you have set MUIA_Application_RequiresCX, you must be
  575.     prepared to receive a NULL pointer. In this case, the
  576.     commodities interface is not available, maybe because the
  577.     user installed a light version of MUI.
  578.  
  579.     SEE ALSO
  580.     MUIA_Application_BrokerHook
  581. Application.mui/MUIA_Application_BrokerHook
  582.  
  583.     NAME
  584.     MUIA_Application_BrokerHook -- (V4 ) [ISG], struct Hook *
  585.  
  586.     FUNCTION
  587.     You specify a pointer to hook structure. The function
  588.     will be called whenever a commodities message arrives
  589.     (between MUI's GetMsg() and ReplyMsg()).
  590.  
  591.     You receive a pointer to the application object
  592.     as object in a2 and a pointer to commodities
  593.     CxMsg message in a1.
  594.  
  595.     NOTES
  596.     The commodities interface isn't available in the
  597.     memory saving "light" version of MUI. Your hook
  598.     will never be called in this case.
  599.  
  600.     SEE ALSO
  601.     MUIA_Application_Broker
  602. Application.mui/MUIA_Application_BrokerPort
  603.  
  604.     NAME
  605.     MUIA_Application_BrokerPort -- (V6 ) [..G], struct MsgPort *
  606.  
  607.     FUNCTION
  608.     Get a pointer to the applications commodities message port.
  609.     If you want to add own Hotkeys to your application, you
  610.     need a message port. Instead of creating your own, you
  611.     should better use this one.
  612.  
  613.     NOTES
  614.     Unless you have set MUIA_Application_RequiresCX, you must be
  615.     prepared to receive a NULL pointer. In this case, the
  616.     commodities interface is not available, maybe because the
  617.     user installed a light version of MUI.
  618.  
  619.     SEE ALSO
  620.     MUIA_Application_BrokerHook
  621. Application.mui/MUIA_Application_BrokerPri
  622.  
  623.     NAME
  624.     MUIA_Application_BrokerPri -- (V6 ) [I.G], LONG
  625.  
  626.     FUNCTION
  627.     Adjust the priority of an applications broker.
  628.  
  629.     SEE ALSO
  630.     MUIA_Application_BrokerHook
  631. Application.mui/MUIA_Application_Commands
  632.  
  633.     NAME
  634.     MUIA_Application_Commands -- (V4 ) [ISG], struct MUI_Command *
  635.  
  636.     FUNCTION
  637.     This attribute allows an application to include 
  638.     its own set of ARexx commands. You specify a
  639.     pointer to an array of MUI_Command structures,
  640.     which look like this:
  641.  
  642.     struct MUI_Command
  643.     {
  644.        char        *mc_Name;
  645.        char        *mc_Template;
  646.        LONG         mc_Parameters;
  647.        struct Hook *mc_Hook;
  648.        LONG         mc_Reserved[5];
  649.     };
  650.  
  651.     mc_Name       contains the name of your command.
  652.                   Commands are not case sensitive.
  653.  
  654.     mc_Template   is an argument template that follows
  655.                   the same rules as dos.library/ReadArgs().
  656.                   It may be NULL, in which case your command
  657.                   doesn't need any parameters.
  658.  
  659.     mc_Parameters is the number of parameters specified
  660.                   in the template array.
  661.  
  662.     mc_Hook       is a pointer to the callback hook defining
  663.                   the function to be called.
  664.  
  665.     You may specify any number of MUI_Command structures,
  666.     but you must terminate your array with a NULL field.
  667.  
  668.     When a command shows up an applications ARexx port,
  669.     MUI parses the arguments according to the given
  670.     template and calls the hook with the application
  671.     object as hook object in a2 and a pointer to
  672.     an array of longwords containing the parameters
  673.     in a1.
  674.  
  675.     The result code of your hook will be replied to
  676.     ARexx as rc.
  677.  
  678.     If you have some simple ARexx commands that just
  679.     emulate some user action (e.g. clicking a button),
  680.     you can use the magic cookie MC_TEMPLATE_ID for 
  681.     mc_Template and a return id value for mc_Parameters. 
  682.     In this case, MUI will do no argument parsing and 
  683.     instead simply return the specified id value on the 
  684.     next call to MUIM_Application_Input.
  685.  
  686.     For more sophisticated possibilities in ARexx
  687.     callback hooks, please refer to
  688.     MUIA_Application_RexxMsg and MUIA_Application_RexxString.
  689.  
  690.     EXAMPLE
  691.     static struct MUI_Command commands[] =
  692.     {
  693.        { "rescan", MC_TEMPLATE_ID, ID_RESCAN, NULL     },
  694.        { "select", "PATTERN/A"   , 1        , &selhook },
  695.        { NULL    , NULL          , NULL     , NULL     }
  696.     };
  697.  
  698.     SEE ALSO
  699.     MUIA_Application_RexxMsg, MUIA_Application_RexxString
  700. Application.mui/MUIA_Application_Copyright
  701.  
  702.     NAME
  703.     MUIA_Application_Copyright -- (V4 ) [I.G], STRPTR
  704.  
  705.     FUNCTION
  706.     A copyright string, containing the year and the
  707.     company.
  708.  
  709.     EXAMPLE
  710.     see MUIA_Application_Title
  711.  
  712.     SEE ALSO
  713.     MUIA_Application_Title, MUIA_Application_Version,
  714.     MUIA_Application_Author, MUIA_Application_Description,
  715.     MUIA_Application_Base
  716. Application.mui/MUIA_Application_Description
  717.  
  718.     NAME
  719.     MUIA_Application_Description -- (V4 ) [I.G], STRPTR
  720.  
  721.     FUNCTION
  722.     Short description, about 40 characters.
  723.     Shown e.g. in commodities exchange.
  724.  
  725.     EXAMPLE
  726.     see MUIA_Application_Title
  727.  
  728.     SEE ALSO
  729.     MUIA_Application_Title, MUIA_Application_Version,
  730.     MUIA_Application_Author, MUIA_Application_Copyright,
  731.     MUIA_Application_Base
  732. Application.mui/MUIA_Application_DiskObject
  733.  
  734.     NAME
  735.     MUIA_Application_DiskObject -- (V4 ) [ISG], struct DiskObject *
  736.  
  737.     FUNCTION
  738.     Pointer to a struct DiskObject, e.g. obtained
  739.     from GetDiskObject(). If present, MUI will use
  740.     this object for the AppIcon when your application
  741.     gets iconified.
  742.  
  743.     Otherwise MUI will try to locate "env:sys/dev_mui.info"
  744.     and, if not present, fall back to a default icon.
  745.  
  746.     EXAMPLE
  747.     ...
  748.     MUIA_Application_DiskObject, 
  749.        dobj = GetDiskObject("PROGDIR:MyApp"),
  750.     ...
  751.  
  752.     /* note that you have to free dobj yourself! */
  753.  
  754.     NOTES
  755.     Unless you have set MUIA_Application_RequiresIconification,
  756.     this attribute might have no effect, maybe because the
  757.     user installed a light version of MUI. You must be prepared
  758.     to receive a NULL pointer when you try to read it!
  759.  
  760.    SEE ALSO
  761.     MUIA_Application_Iconified
  762. Application.mui/MUIA_Application_DoubleStart
  763.  
  764.     NAME
  765.     MUIA_Application_DoubleStart -- (V4 ) [..G], BOOL
  766.  
  767.     FUNCTION
  768.     This attribute is set automatically when the user
  769.     tries to start a MUIA_SingleTask application twice.
  770.     You can react on this and take appropriate actions,
  771.     e.g. pop up a requester or quit yourself.
  772.  
  773.     SEE ALSO
  774.     MUIA_Application_SingleTask
  775. Application.mui/MUIA_Application_DropObject
  776.  
  777.     NAME
  778.     MUIA_Application_DropObject -- (V5 ) [IS.], Object *
  779.  
  780.     FUNCTION
  781.     If your application is iconified and the user drops
  782.     icons onto the AppIcon, the object specified here will 
  783.     receive the AppMessage.
  784.  
  785.     SEE ALSO
  786.     MUIA_Window_AppWindow, MUIM_CallHook
  787. Application.mui/MUIA_Application_ForceQuit
  788.  
  789.     NAME
  790.     MUIA_Application_ForceQuit -- (V8 ) [..G], BOOL
  791.  
  792.     FUNCTION
  793.     When your input loop receives a MUIV_Application_ReturnID_Quit,
  794.     you should query this attribute. In case its TRUE, your program
  795.     should exit quietly without popping up any safety requesters or 
  796.     other stuff.
  797.  
  798.     MUI will e.g. set this if the user issued a "QUIT FORCE" ARexx
  799.     command to your application.
  800. Application.mui/MUIA_Application_HelpFile
  801.  
  802.     NAME
  803.     MUIA_Application_HelpFile -- (V8 ) [ISG], STRPTR
  804.  
  805.     FUNCTION
  806.     This attribute allows defining an AmigaGuide style file
  807.     to be displayed when the user requests online help.
  808.  
  809.     When the HELP button is pressed and the application
  810.     defines a MUIA_Application_HelpFile, MUI tries to obtain
  811.     MUIA_HelpNode from the current object (the one under
  812.     the mouse pointer). If MUIA_HelpNode is not defined,
  813.     MUI continues asking the parent object for this
  814.     attribute (usually a group, but remember: the parent
  815.     of a windows root object is the window itself, the
  816.     parent of a window is the application).
  817.  
  818.     When a non NULL MUIA_HelpNode is found, the same procedure
  819.     is applied to MUIA_HelpLIne. Then MUI puts the application 
  820.     to sleep and displays the file at the position specified 
  821.     with MUIA_HelpNode and/or MUIA_HelpLine.
  822.  
  823.     This behaviour allows you to define one 
  824.     MUIA_Application_HelpFile for your application object 
  825.     and different help nodes and lines for your applications 
  826.     windows and/or gadgets.
  827.  
  828.     EXAMPLE
  829.  
  830.     ApplicationObject,
  831.        ...
  832.        MUIA_Application_HelpFile, "progdir:myapp.guide",
  833.        ...,
  834.        SubWindow, WindowObject,
  835.           MUIA_Window_Title, "Prefs Window",
  836.           ...,
  837.           MUIA_HelpNode, "prefs-section",
  838.           ...,
  839.           End,
  840.  
  841.        SubWindow, WindowObject,
  842.           MUIA_Window_Title, "Play Window",
  843.           ...
  844.           MUIA_HelpNode, "play-section",
  845.           ...
  846.           WindowContents, VGroup,
  847.              ...,
  848.              Child, StringObject,
  849.                 MUIA_HelpNode, "play-string",
  850.                 ...,
  851.                 End,
  852.              End,
  853.           End,
  854.        End;
  855.  
  856.     In this case, the user will get the prefs-section chapter
  857.     of "myapp.guide" when he requests help in the Prefs window,
  858.     the play-string chapter when he requests help over the
  859.     string gadget in the Play window or the play-section
  860.     chapter somewhere else in the Play window.
  861.  
  862.     NOTES
  863.     Since muimaster.library V8, this attribute replaces the old
  864.     and obsolete MUIA_HelpFile attribute. MUI no longer supports
  865.     the possibility to specify different help files for different
  866.     parts of your application. This step was necessary due to
  867.     some other internal changes and enhancements.
  868.  
  869.     SEE ALSO
  870.     MUIA_HelpNode, MUIA_HelpLine
  871. Application.mui/MUIA_Application_Iconified
  872.  
  873.     NAME
  874.     MUIA_Application_Iconified -- (V4 ) [.SG], BOOL
  875.  
  876.     FUNCTION
  877.     Setting this attribute to TRUE causes the application
  878.     to become iconified. Every open window will be closed
  879.     and a (configurable) AppIcon will appear on the workbench.
  880.  
  881.     Same thing happens when the user hits the iconify gadget
  882.     in the window border or uses commodities Exchange to
  883.     hide your applications interface.
  884.  
  885.     There is no way for you to prevent your application from
  886.     being iconified. However, you can react on the iconification
  887.     by listening to the MUIA_Application_Iconified attribute
  888.     with notification. This allows you to free some resources
  889.     you don't need in iconified state.
  890.  
  891.     When an application is iconified and you try to open a
  892.     window, the window won't open immediately. Instead MUI
  893.     remembers this action and opens the window once the
  894.     application is uniconified again.
  895.  
  896.     EXAMPLE
  897.  
  898.     /* inform the main input loop of iconification events */
  899.  
  900.     #define ID_HIDE 42
  901.     #define ID_SHOW 24
  902.  
  903.     DoMethod(app,MUIM_Notify,
  904.        MUIA_Application_Iconified, TRUE,
  905.        app, 2, MUIM_Application_ReturnID, ID_HIDE);
  906.  
  907.     DoMethod(app,MUIM_Notify,
  908.        MUIA_Application_Iconified, FALSE,
  909.        app, 2, MUIM_Application_ReturnID, ID_SHOW);
  910.  
  911.     SEE ALSO
  912.     MUIA_Application_DiskObject
  913. Application.mui/MUIA_Application_Menu
  914.  
  915.     NAME
  916.     MUIA_Application_Menu -- (V4 ) [I.G], struct NewMenu * (OBSOLETE)
  917.  
  918.     FUNCTION
  919.     Obsolete, use MUIA_Application_Menustrip instead.
  920.  
  921.     SEE ALSO
  922.     MUIA_Application_Menustrip
  923. Application.mui/MUIA_Application_MenuAction
  924.  
  925.     NAME
  926.     MUIA_Application_MenuAction -- (V4 ) [..G], ULONG
  927.  
  928.     FUNCTION
  929.     Whenever a menu item is selected, this attribute will be
  930.     set to the corresponding UserData field of the gadtools
  931.     NewMenu structure. This allows reacting on menu items
  932.     via broadcasting.
  933.  
  934.     SEE ALSO
  935.     MUIA_Application_Menu, MUIA_Application_MenuAction
  936. Application.mui/MUIA_Application_MenuHelp
  937.  
  938.     NAME
  939.     MUIA_Application_MenuHelp -- (V4 ) [..G], ULONG
  940.  
  941.     FUNCTION
  942.     Whenever a menu item is selected with the help key, this
  943.     attribute will be set to the corresponding UserData field
  944.     of the gadtools NewMenu structure. Together with
  945.     MUIM_Application_ShowHelp this allows creation of
  946.     menu help texts.
  947.  
  948.     SEE ALSO
  949.     MUIA_Application_Menu, MUIA_Application_ShowHelp
  950. Application.mui/MUIA_Application_Menustrip
  951.  
  952.     NAME
  953.     MUIA_Application_Menustrip -- (V8 ) [I..], Object *
  954.  
  955.     FUNCTION
  956.     Specify a menu strip object for the application. The object
  957.     is treated as a child of the application and will be disposed
  958.     when the application is disposed.
  959.  
  960.     Menustrip objects defined for the application are used
  961.     as menu for every window of the application, as long as
  962.     the window doesn't define its private menu.
  963.  
  964.     MUIA_Application_Menustrip replaces the old and obsolete
  965.     MUIA_Application_Menu tag.
  966.  
  967.     Usually, you will create the menu object with MUI's builtin
  968.     object library from a gadtools NewMenu structure, but its
  969.     also OK to define the menu tree "by hand" using the
  970.     Family class.
  971. Application.mui/MUIA_Application_RexxHook
  972.  
  973.     NAME
  974.     MUIA_Application_RexxHook -- (V7 ) [ISG], struct Hook *
  975.  
  976.     FUNCTION
  977.     When specified, MUI calls this hook whenever a rexx message 
  978.     arrives and MUI can't map it to a builtin or a programmer
  979.     specified command. The hook will be called with a pointer 
  980.     to itself in A0, a pointer to the application object in A2 
  981.     and a pointer to a struct RexxMsg in A1.
  982.  
  983.     The return code from the hook is used as result code
  984.     when replying the message, the secondary result can
  985.     be set with MUIA_Application_RexxString.
  986.  
  987.     SEE ALSO
  988.     MUIA_Application_Commands
  989. Application.mui/MUIA_Application_RexxMsg
  990.  
  991.     NAME
  992.     MUIA_Application_RexxMsg -- (V4 ) [..G], struct RxMsg *
  993.  
  994.     FUNCTION
  995.     Within an ARexx callback hook, you can obtain
  996.     a pointer to the RexxMsg that came with the
  997.     command. This allows you to use some ARexx
  998.     support functions coming with amiga.lib
  999.  
  1000.     SEE ALSO
  1001.     MUIA_Application_Commands, MUIA_Application_RexxString
  1002. Application.mui/MUIA_Application_RexxString
  1003.  
  1004.     NAME
  1005.     MUIA_Application_RexxString -- (V4 ) [.S.], STRPTR
  1006.  
  1007.     FUNCTION
  1008.     ARexx allows returning a string as result of a
  1009.     function call. This attribute allows setting the
  1010.     result string within an ARexx callback hook.
  1011.  
  1012.     The string is temporarily copied.
  1013.  
  1014.     SEE ALSO
  1015.     MUIA_Application_Commands, MUIA_Application_RexxMsg
  1016. Application.mui/MUIA_Application_SingleTask
  1017.  
  1018.     NAME
  1019.     MUIA_Application_SingleTask -- (V4 ) [I..], BOOL
  1020.  
  1021.     FUNCTION
  1022.     Boolean value to indicate whether or not your application
  1023.     is a single task program. When set to TRUE, MUI will
  1024.     refuse to create more than one application object.
  1025.  
  1026.     In this case, the already running application gets its
  1027.     MUIA_DoubleStart attribute set to TRUE. You can listen
  1028.     to this and take appropriate actions, e.g. pop up
  1029.     a requester.
  1030.  
  1031.     Examples for single task applications are the system
  1032.     preferences program. It doesn't make sense for them
  1033.     to run more than once.
  1034.  
  1035.     SEE ALSO
  1036.     MUIA_Application_DoubleStart
  1037. Application.mui/MUIA_Application_Sleep
  1038.  
  1039.     NAME
  1040.     MUIA_Application_Sleep -- (V4 ) [.S.], BOOL
  1041.  
  1042.     FUNCTION
  1043.     This attribute can be used to put a whole application
  1044.     to sleep. All open windows get disabled and a busy
  1045.     pointer appears.
  1046.  
  1047.     This attribute contains a nesting count, if you tell
  1048.     your application to sleep twice, you will have to tell 
  1049.     it to wake up twice too.
  1050.  
  1051.     If you need to do some time consuming actions, you
  1052.     always should set this attribute to inform the user
  1053.     that you are currently unable to handle input.
  1054.  
  1055.     A sleeping application's windows cannot be resized.
  1056.  
  1057.     EXAMPLES
  1058.     set(app,MUIA_Application_Sleep,TRUE ); // go to bed
  1059.     calc_fractals();
  1060.     set(app,MUIA_Application_Sleep,FALSE); // wake up
  1061.  
  1062.     SEE ALSO
  1063.     MUIA_Window_Sleep, MUIM_Application_InputBuffered
  1064. Application.mui/MUIA_Application_Title
  1065.  
  1066.     NAME
  1067.     MUIA_Application_Title -- (V4 ) [I.G], STRPTR
  1068.  
  1069.     FUNCTION
  1070.     This tag defines the title of an application.
  1071.     The title is e.g. shown in Commodities Exchange
  1072.     or in the MUI preferences program.
  1073.  
  1074.     An application title shall not contain any version
  1075.     information, just the pure title. Also, special
  1076.     characters such as ":/()#?*..." are not allowed.
  1077.  
  1078.     You should use a quiet long and unique name for
  1079.     your applications. Naming it "Viewer" or "Browser"
  1080.     is not a wise choice.
  1081.  
  1082.     The length of the name must not exceed 30 characters!
  1083.  
  1084.     EXAMPLE
  1085.     ApplicationObject,
  1086.        MUIA_Application_Title      , "WbMan",
  1087.        MUIA_Application_Version    , "$VER: WbMan 0.24 (19.7.93)",
  1088.        MUIA_Application_Copyright  , "© 1993 by Klaus Melchior",
  1089.        MUIA_Application_Author     , "Klaus Melchior",
  1090.        MUIA_Application_Description, "Manages the WBStartup.",
  1091.        MUIA_Application_Base       , "WBMAN",
  1092.        ...
  1093.  
  1094.     SEE ALSO
  1095.     MUIA_Application_Version, MUIA_Application_Copyright,
  1096.     MUIA_Application_Author, MUIA_Application_Description,
  1097.     MUIA_Application_Base
  1098. Application.mui/MUIA_Application_UseCommodities
  1099.  
  1100.     NAME
  1101.     MUIA_Application_UseCommodities -- (V10) [I..], BOOL
  1102.  
  1103.     FUNCTION
  1104.     When set to FALSE, the application will run without a 
  1105.     commodities interface. Think very well before using this
  1106.     tag!
  1107.  
  1108.     SEE ALSO
  1109.         MUIA_Application_UseRexx
  1110. Application.mui/MUIA_Application_UseRexx
  1111.  
  1112.     NAME
  1113.     MUIA_Application_UseRexx -- (V10) [I..], BOOL
  1114.  
  1115.     FUNCTION
  1116.     When set to FALSE, the application will run without an
  1117.     ARexx interface. Think very well before using this
  1118.     tag!
  1119.  
  1120.     SEE ALSO
  1121.         MUIA_Application_UseCommodities
  1122. Application.mui/MUIA_Application_Version
  1123.  
  1124.     NAME
  1125.     MUIA_Application_Version -- (V4 ) [I.G], STRPTR
  1126.  
  1127.     FUNCTION
  1128.     Define a version string for an application.
  1129.     This string shall follow standard version string
  1130.     convetions but must *not* contain a leading "\0".
  1131.  
  1132.     EXAMPLE
  1133.     see MUIA_Application_Title
  1134.  
  1135.     SEE ALSO
  1136.     MUIA_Application_Title, MUIA_Application_Copyright,
  1137.     MUIA_Application_Author, MUIA_Application_Description,
  1138.     MUIA_Application_Base
  1139. Application.mui/MUIA_Application_Window
  1140.  
  1141.     NAME
  1142.     MUIA_Application_Window -- (V4 ) [I..], Object *
  1143.  
  1144.     FUNCTION
  1145.     A pointer to a MUI object of Window class. An
  1146.     application may have any number of sub windows,
  1147.     each of them being a child of the application.
  1148.  
  1149.     When the application receives some kind of user
  1150.     input through its IDCMP, it diverts the message
  1151.     down to its children, as long as they are opened.
  1152.  
  1153.     Things like iconification or preferences changes
  1154.     cause the application object to temporarily close
  1155.     every open window (and reopen it later). Your
  1156.     main program normally doesn't need to deal with
  1157.     these things.
  1158.  
  1159.     As with the children of group class, it's common
  1160.     to use a call to MUI_NewObject() as value for
  1161.     this attribute. No error checking needs to be
  1162.     done, the application object handles every
  1163.     failure automatically.
  1164.  
  1165.     When you dispose your application, its sub windows
  1166.     will also get deleted. Thus, the only thing to do
  1167.     to remove your application is a
  1168.  
  1169.     MUI_DisposeObject(ApplicationObject);
  1170.  
  1171.     Every window, every gadget, every memory will be
  1172.     freed by this single call.
  1173.  
  1174.     EXAMPLE
  1175.     Please refer to one of the example programs.
  1176.  
  1177.     SEE ALSO
  1178.